package com.edu.model;

import java.awt.Color;

public class Piece {
	private String key;
	private String name;
	private Color color;
	private Position position;
	
	
	public Piece(Position position, PieceType type) {
		this.key = type.getKey();
		this.color = name.charAt(0)=='r' ? Color.RED : Color.BLACK;
		this.name = type.getName();
		this.position = position;
	}

	public String getKey() {
		return key;
	}

	public Color getColor() {
		return color;
	}
	public String getName() {
		return name;
	}
	public Position getPosition() {
		return position;
	}

	public void setPosition(Position position) {
		this.position = position;
	}
	
	
}
